package com.edu.scau.service;



import com.edu.scau.dao.implement.UserDaoImpl;
import com.edu.scau.entity.User;

public class Register {
	

	
	public Boolean UserRegister(int id,String name,String pw,String addr,String email,String phone,String sex) {
		UserDaoImpl Dao = new UserDaoImpl();
		User user2=Dao.get(id);
		if(user2!=null) return false;
		User user=new User();
		user.setId(id);
		user.setAddress(addr);
		user.setEmail(email);
		user.setName(name);
		user.setPhoneNumber(phone);
		user.setSex(sex);
		user.setPassword(pw);
		return Dao.save(user);
	}
}
